/**
 * 
 */
package xj.toolkit.netty.handler.codec.http;

import xj.toolkit.netty.handler.codec.http.transformer.HttpRequestTransformer;

/**
 * @author hp
 *
 */
public class HttpCommandCodeRegistryController {
	private	HttpCommandCodeRegistry	registry;
	private	String					code;
	private HttpRequestTransformer transformer;

	/**
	 * @return the registry
	 */
	public HttpCommandCodeRegistry getRegistry() {
		return registry;
	}
	/**
	 * @param registry the registry to set
	 */
	public void setRegistry(HttpCommandCodeRegistry registry) {
		this.registry = registry;
	}
	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}
	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}
	/**
	 * @return the transformer
	 */
	public HttpRequestTransformer getTransformer() {
		return transformer;
	}
	/**
	 * @param transformer the transformer to set
	 */
	public void setTransformer(HttpRequestTransformer transformer) {
		this.transformer = transformer;
	}
	
	public	void	register() {
		registry.register(code, transformer);
	}
	
	public	void	unregister() {
		registry.unregister(code, transformer);
	}
}
